package com.yx.fsysserver.file.component;/**
 * Created by lichagnfeng on 2017/3/3.
 */

import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * file access
 *
 * @author
 * @create 2017-03-03 16:32
 **/
@Component
public interface FileAccessComp {

    public void write(File file, String savePath) throws Exception;

    public void write(InputStream inputStream, String savePath, String fileName) throws Exception;

    public void writeDir(File dirFile,String savePath) throws Exception;

    public boolean delete(String filePath) throws Exception;

    public InputStream read(String filePath) throws Exception;

    public Long getFileLength(String filePath);

}
